#include "include/print.h"
#include "include/mm.h"

unsigned long mem_size = 0;

void mm_init()
{
    struct e820map *e820 = (struct e820map *)0x13000;

    for(int i = 0; i < e820->nr_entry; i++) {
        if(e820->map[i].type == E820_RAM) {
            unsigned long tmp = e820->map[i].addr + e820->map[i].size;
            if(tmp > mem_size) {
                mem_size = tmp;
            }
        }
    }

    print(mem_size);
}


